package com.abbas.wallerpaper.base;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.abbas.wallerpaper.R;
import com.google.android.material.snackbar.Snackbar;
import com.gyf.immersionbar.ImmersionBar;

public abstract class BaseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());

        ImmersionBar.with(this)
                .statusBarView(R.id.status_bar_dimen)
                .statusBarDarkFont(true)
                .init();

        init();
        initEvent();
    }

    protected abstract int getLayoutId();

    protected abstract void init();

    protected abstract void initEvent();

    protected void showTip(View view, String tip) {
        Snackbar.make(view, tip, Snackbar.LENGTH_SHORT).show();
    }


}